#!/usr/bin/env bash
echo "update system"
apt-get -y update
apt-get -y upgrade
apt-get install -y apt-transport-https ca-certificates curl vim
echo " add new docker GPG key "
sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo " add docker repository"
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" > /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y docker-engine
service docker start
sudo docker run hello-world
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://a5dd3ec6.m.daocloud.io
service docker restart
